/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.core.dto;

import com.mt.roll.core.base.BaseDto;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 登录日志传输对象
 *
 * @author jiff
 * @date 2018/11/1
 * @since 1.0
 */
@Data
@Accessors(chain = true)
@Builder
public class LoginLogDto extends BaseDto {
    public static final int ACTION_LOGIN = 1;
    public static final int ACTION_LOGOUT = 2;
    public static final int LOGIN_TYPE_SELF = 1;
    public static final int LOGIN_TYPE_ROAM = 2;
    public static final int LOGOUT_TYPE_SELF = 1;
    public static final int LOGOUT_TYPE_MANAGE = 2;
    public static final int LOGOUT_TYPE_EXPIRED = 3;
    private String parentSessionId;
    private String parentUserName;
    private String sessionId;
    private Long passportUserId;
    private Long userId;
    private Long accountId;
    private Long orgId;
    private String account;
    private String mobile;
    private String userName;
    private int userType;
    private int appType;
    private int appCode;

    private String ip;

    /**
     * 用户代理
     */
    private String userAgent;
    private Date loginTime;
    private Date logoutTime;
    private int result;
    /**
     * 登录类型：1、自主登录，2、漫游登录
     */
    private int loginType;
    /**
     * 退出类型：1、自主退出，2、管理退出，3，超时退出
     */
    private int logoutType;
    /**
     * 操作动作：1、登录，2、退出
     */
    private int action;
}
